package mya.mes.mdc.queries.mdc;

import mya.common.jpa.context.ServiceContext;
import mya.common.jpa.exceptions.QueryException;
import mya.mes.mdc.model.mdc.MdcTagDef;
import mya.mes.mdc.model.system.TagType;

import java.util.List;

public class MdcTagDefQuery {

    public static List<MdcTagDef> queryAll(ServiceContext context) throws QueryException {

        List<MdcTagDef> list = context.em.createNamedQuery("MdcTagDef.queryAll", MdcTagDef.class).getResultList();
        return list;
    }

    public static List<TagType> queryTagType(ServiceContext context) {
        List<TagType> tagTypes = context.em.createNamedQuery("TagType.queryTagType",TagType.class).getResultList();
        return tagTypes;
    }
}
